package com.amado.course07Array;

//1.	有一个数组如下: int[] array = {20, 3, 44, 1, 15, 33, 81, 26, 85, 9}, 
//请将数组的首尾互换,然后再打印一遍整个数组
public class Array1 {
	public static void main(String[] args) {
		int[] array = { 20, 3, 44, 1, 15, 33, 81, 26, 85, 9 };
		//temp=20
		int temp = array[0];
		// array[0]=9
		array[0] = array[array.length-1];
		//array[array.length-1]  =20
		array[array.length-1] = temp;
		for (int value : array) {
			System.out.print(value +" ");
		}
	}
}
